# -*- coding: utf-8 -*-
from django.db import models

class Hobby(models.Model):
    name = models.CharField(max_length = 100)

# Create your models here.
class Address(models.Model):
    street = models.CharField(max_length = 100)
    house = models.IntegerField()
    apartment = models.IntegerField()

class Person(models.Model):
    age = models.IntegerField()
    name = models.CharField(max_length = 100)
    address = models.ForeignKey(Address)
    hobby = models.ManyToManyField(Hobby, null = True)

class Student(Person):
    grade = models.IntegerField()

class SubclassedStudent(Student):
    pass

class Worker(Person):
    experience = models.IntegerField()